﻿namespace DataExporter
{
    static class HookerApi
    {
        private const string dllName = "hook.dll";

        /// Return Type: BOOL->int
        [System.Runtime.InteropServices.DllImportAttribute(dllName, EntryPoint = "Hook")]
        [return: System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
        public static extern bool Hook();


        /// Return Type: BOOL->int
        [System.Runtime.InteropServices.DllImportAttribute(dllName, EntryPoint = "EnableHook")]
        public static extern void EnableHook([System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]bool enable);



        /// Return Type: void
        ///fileName: LPCTSTR->LPCWSTR->WCHAR*
        [System.Runtime.InteropServices.DllImportAttribute(dllName, EntryPoint = "SetFilePath")]
        public static extern void SetFilePath([System.Runtime.InteropServices.InAttribute()] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPTStr)] string fileName);


        [System.Runtime.InteropServices.DllImportAttribute(dllName, EntryPoint = "GetErrorMessage")]
        public static extern void GetErrorMessage([System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPWStr)] System.Text.StringBuilder errorMessage);


        [System.Runtime.InteropServices.DllImportAttribute(dllName, EntryPoint = "ClearErrorMessage")]
        public static extern void ClearErrorMessage();

    }

}
